<extend name="./Application/Admin/View/Layout/application.html"/>
<block name="content">
    <div class="row">
        <div class="col-md-9">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title">新增栏目</h3>
                </div>
                <div class="panel-body">


                    <ul class="nav nav-tabs" role="tablist">
                        <li role="presentation" class="active">
                            <a href="#home" aria-controls="home" role="tab" data-toggle="tab">增加栏目</a>
                        </li>
                        <li role="presentation">
                            <a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">栏目内容</a>
                        </li>
                    </ul>

                    <!-- Tab panes -->
                    <form class="form-horizontal" action="__SELF__" method="post">

                        <div class="tab-content">
                            <div role="tabpanel" class="tab-pane active" id="home">
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">上级分类</label>
                                    <div class="col-sm-10">
                                        <select name="parent_id" class="form-control">
                                            <option value="0">顶级分类</option>
                                            <volist name="categories" id="category">
                                                <option value="{{$category.id}}">
                                                    {{$category.name}}
                                                    <volist name="category.children" id="child">
                                                <option value="{{$child.id}}">
                                                    &nbsp;&nbsp;&nbsp;&nbsp;|--{{$child.name}}
                                                </option>
                                            </volist>
                                            </option>
                                            </volist>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="name" class="col-sm-2 control-label">名称</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control" name="name" id="name"
                                               placeholder="栏目名称">
                                    </div>
                                </div>


                                <div class="form-group">
                                    <label for="" class="col-sm-2 control-label">是否显示</label>
                                    <div class="col-sm-10">
                                        <label class="radio-inline">
                                            <input type="radio" name="is_show" value="1" checked> 是
                                        </label>
                                        <label class="radio-inline">
                                            <input type="radio" name="is_show" value="0"> 否
                                        </label>
                                    </div>
                                </div>



                                <div class="form-group">
                                    <label for="url" class="col-sm-2 control-label">URL地址</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control" name="url" id="url"
                                               placeholder="请填入url地址">
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label for="" class="col-sm-2 control-label">类型</label>
                                    <div class="col-sm-10">
                                        <label class="radio-inline">
                                            <input type="radio" name="type" value="0" checked> 封面
                                        </label>
                                        <label class="radio-inline">
                                            <input type="radio" name="type" value="1"> 列表
                                        </label>
                                        <label class="radio-inline">
                                            <input type="radio" name="type" value="2"> 跳转
                                        </label>
                                    </div>
                                </div>
                            </div>

                            <div role="tabpanel" class="tab-pane" id="profile">
                                <textarea name="content" id="container" cols="30" rows="10"></textarea>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10">
                                <button type="submit" class="btn btn-primary">保 存</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</block>